package com.dingreading.cloud.web.service.impl;

import com.dingreading.cloud.web.entity.table.MsgSendsTableDef;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.dingreading.cloud.web.entity.MsgSends;
import com.dingreading.cloud.web.mapper.MsgSendsMapper;
import com.dingreading.cloud.web.service.MsgSendsService;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 *  服务层实现。
 *
 * @author Administrator
 * @since 2024-12-23
 */
@Service
public class MsgSendsServiceImpl extends BaseServiceImpl<MsgSendsMapper, MsgSends, MsgSendsTableDef> implements MsgSendsService {

    @Override
    protected MsgSendsTableDef getTable() {
        return MsgSendsTableDef.msgSends;
    }

    @Override
    public List<MsgSends> getByPhoneAndCode(String phone, String msgCode) {
        return getMapper().selectListByCondition(table.phone.eq(phone).and(table.code.eq(msgCode)));
    }
}
